// import { defaultTheme, defineUserConfig } from 'vuepress';
// const { defaultTheme } = require('vuepress');
// import { demoblockPlugin } from 'vuepress-plugin-demoblock-plus'

module.exports = {
  dest: 'dist',
  lang: 'zh-CN',
  title: '呆小徐',
  port: 5900,
  description: '记录分享的前端站点',
  head: [['link', { rel: 'icon', href: '/logo.png' }]],
  themeConfig: {
    displayAllHeaders: true, // 默认值：false
    // sidebar: 'auto', // 自动生成侧边栏
    sidebarDepth: 2, // 侧边栏显示2级
    nav: [
      // 普通链接
      { text: '文档', link: '/guide/' },
      // 下拉列表
      { text: '面试', link: '/interviews/css/css.md' }
      // // 分组下拉列表
      // { text: '资源', children: [
      //     { text: '分组1', children: [
      //         { text: 'HTML', link: '/' },
      //         { text: 'CSS', link: '/' },
      //         { text: 'JavaScript', link: '/' },
      //     ] },
      //     { text: '分组2', children: [
      //         { text: 'HTML', link: '/' },
      //         { text: 'CSS', link: '/' },
      //         { text: 'JavaScript', link: '/' },
      //     ] },
      // ] },
    ],
    sidebar: {
      '/guide/': [
        {
          title: '文档指南',
          collapsible: false,
          children: [
            {
              title: 'JavaScript',
              collapsible: true,
              children: [
                '/guide/javascript/浮点数运算.md',
                '/guide/javascript/你不知道的this.md',
                '/guide/javascript/手写题.md',
                '/guide/javascript/深入探究：null和undefined的区别.md',
                '/guide/javascript/位运算符最佳实践.md'
              ]
            },
            {
              title: 'CSS',
              collapsible: true,
              children: [
                '/guide/css/多文字省略展开收起效果.md',
                '/guide/css/CSS实现auto高度的过渡动画.md',
                '/guide/css/CSS效果.md',
                '/guide/css/Less编写函数分享.md',
                '/guide/css/Unocss的1单位=1px设置.md'
              ]
            },
            {
              title: 'HTML'
              // collapsible: true,
              // children: [
              //     '/guide/html/index.md',
              // ]
            },
            {
              title: 'Vue2',
              collapsible: true,
              children: [
                '/guide/vue/vue2常用的自定义指令.md',
                '/guide/vue/vue2函数式组件.md',
                '/guide/vue/解决Vuex状态丢失.md'
              ]
            },
            {
              title: 'Vue3',
              collapsible: true,
              children: [
                '/guide/vue3/获取组件实例避免提示undefined.md',
                '/guide/vue3/Computed拦截prop.md'
              ]
            },
            {
              title: 'React',
              collapsible: true,
              children: [
                '/guide/react/你真的会用setState吗.md',
                '/guide/react/函数组件使用Redux及Hooks使用.md'
              ]
            },
            {
              title: 'TypeScript',
              collapsible: true,
              children: ['/guide/typescript/extends.md', '/guide/typescript/interface和type区别.md']
            },
            {
              title: 'Webpack',
              collapsible: true,
              children: [
                '/guide/webpack/webpack基础配置解析.md',
                '/guide/webpack/webpack4配置优化.md',
                '/guide/webpack/优化打包方案.md'
              ]
            },
            {
              title: 'Git',
              collapsible: true,
              children: ['/guide/git/常用命令.md']
            },
            {
              title: 'NodeJS',
              collapsible: true,
              children: [
                '/guide/node/Linux下文件操作.md',
                '/guide/node/npm相关指令操作.md',
                '/guide/node/nvm常见命令.md',
                '/guide/node/yarn指令操作.md'
              ]
            },
            {
              title: '浏览器',
              collapsible: true,
              children: ['/guide/browser/前端缓存总结-HTTP缓存.md', '/guide/browser/浅析CDN原理.md']
            },
            {
              title: '实用代码片段',
              collapsible: true,
              children: ['/guide/code/实用代码片段.md', '/guide/code/常用正则.md']
            }
          ]
        }
      ],
      '/interviews/': [
        '/interviews/css/css.md',
        '/interviews/css/write-css.md',
        '/interviews/css/html.md',
        '/interviews/jquery/jquery.md'
      ]
    },
    lastUpdatedText: '上次更新',
    contributors: false,
    contributorsText: '贡献者'
  }
};
